import { Addon, Node } from '@antv/x6'
import { Start } from './modules/Start'
import { Flow } from './modules/Flow'
import { OptionalFlow } from './modules/OptionalFlow'
import { Judge } from './modules/Judge'
import { Data } from './modules/Data'
import { Connect } from './modules/Connect'
import { Database } from './modules/Database'
import { ChildrenProcess } from './modules/ChildrenProcess'
import { DocumentText } from './modules/DocumentText'

interface IFNodeGroups {
  /**节点标题 */
  group: Addon.Stencil.Group
  /**节点列表 */
  node: Node.Metadata[]
}

/**模板节点配置 */
export const stencilNodeOptions: IFNodeGroups[] = [
  {
    group: {
      name: 'basic',
      title: '基础节点',
      graphHeight: 500
    },
    node: [
      Start,
      Flow,
      OptionalFlow,
      Judge,
      Data,
      Connect,
      Database,
      ChildrenProcess,
      DocumentText
    ]
  }
]
